﻿import { post, put, get,del } from "@/utils/hettpUtils/httpRequest";

export const adminColumns = [
  // {
  //   title: "所属站点",
  //   dataIndex: "tenantIds",
  // },
  {
    title: "账号",
    dataIndex: "account",
  },

  {
    title: "昵称",
    dataIndex: "nickName",
  },
  {
    title: "手机号",
    dataIndex: "phone",
  },
  {
    title: "邮箱",
    dataIndex: "email",
  },
  {
    title: "微信账户",
    dataIndex: "weChartAccount",
  },
  {
    title: "上次登录IP地址",
    dataIndex: "lastLoginIp",
  },
  {
    title: "上次登录时间",
    dataIndex: "lastLoginTime",
    align: "center",
  },
  {
    title: "登录总次数",
    dataIndex: "loginTotalCount",
    align: "center",
  },
  {
    align: "center",
    title: "状态",
    dataIndex: "status",
    scopedSlots: { customRender: "status" },
  },
  {
    align: "center",
    title: "操作",
    dataIndex: "action",
    scopedSlots: { customRender: "action" },
  },
];

export const addAdmin = (parameter) => post("api/admin/add", parameter);
export const deleteAdmin = (parameter) => del("api/admin/delete", parameter);
export const updateAdmin = (parameter) => put("api/admin/update", parameter);
export const updatePwd = (parameter) => put("api/admin/updatePwd", parameter);
export const getAdmin = (parameter) => get("api/admin/get", parameter);
export const queryAdminPage = (parameter) => post("api/admin/pages", parameter);
export const changeStatus = (parameter) => put("api/admin/changeStatus", parameter);
